package com.pangyangyang.elasticsearch.plugin.event;

import java.util.HashMap;
import java.util.Map;

/**
 * 通用的数据变更描述事件
 * Created by yangwang on 2015/1/15.
 */
public class DataModifyEvent {

    private String dataDestination;
    private DataModifyEventType type;
//    private Map<String, String> meta = new HashMap<String, String>();
    private Map<String, String> data = new HashMap<String, String>();

    public String getDataDestination() {
        return dataDestination;
    }

    public void setDataDestination(String dataDestination) {
        this.dataDestination = dataDestination;
    }

    public DataModifyEventType getType() {
        return type;
    }

    public void setType(DataModifyEventType type) {
        this.type = type;
    }

    public Map<String, String> getData() {
        return data;
    }

    public void putData(String key, String value){
        this.data.put(key, value);
    }

    public String getData(String key){
        return this.data.get(key);
    }

//    public void putMeta(String key, String value){
//        this.meta.put(key, value);
//    }
//
//    public String getMeta(String key){
//        return this.meta.get(key);
//    }
}
